package com.xc.stock.domain.basic.repository;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.rp.spring.jpa.GenericJpaRepository;
import com.xc.stock.domain.basic.convert.AccountLogConvert;
import com.xc.stock.domain.basic.convert.IEntityPOConvert;
import com.xc.stock.domain.basic.entity.AccountLog;
import com.xc.stock.infrastructure.db.po.AccountLogPO;
import com.xc.stock.infrastructure.db.repo.AccountLogRepo;
import com.xc.stock.utils.SpringUtils;

import lombok.RequiredArgsConstructor;

/**
 * AccountLogRepository 
 *
 * @author xlfd 
 * @email xlfd@gmail.com 
 * @created 2022/03/25 
 */
@Repository
@RequiredArgsConstructor(
    onConstructor = @__(@Autowired)
)
public class AccountLogRepository extends SimplePoConvertEntityRepository<AccountLog, AccountLogPO, Integer> {
  final AccountLogRepo repo;

  final AccountLogConvert convert;

  @Override
  public GenericJpaRepository<AccountLogPO, Integer> repo() {
    return repo;
  }

  @Override
  public IEntityPOConvert<AccountLog, AccountLogPO> convert() {
    return convert;
  }

  public static AccountLogRepository of() {
    return SpringUtils.getBean(AccountLogRepository.class);
  }
}
